<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require_once("Connections/conn_admin.php");
mysql_select_db($database_conn_admin);
$query = sprintf("select distinct nama_jabatan from nama_jabatan");
$rs_jabatan = mysql_query($query);
while ($row_jabatan = mysql_fetch_assoc($rs_jabatan)){
    $data[] = array(
        'label' => $row_jabatan['nama_jabatan'],
        'value' => $row_jabatan['nama_jabatan']
    );
}

$json = json_encode($data);
echo $json;
?>
